package com.ctfo.ulcp.exp.db


enum class LLMModel(val code: String) {
    OpenAI("openai"), DashScope("tongyi");
}

enum class RouteType(val code: String) {
    Doc("doc"), Code("code"), Direct("direct");

    companion object {
        @OptIn(ExperimentalStdlibApi::class)
        fun fromCode(value: String) = entries.firstOrNull { it.code == value }
            ?: throw IllegalArgumentException("No enum constant with code $value")
    }
}


enum class ResourceType(val description: String) {
    DOC("文档"), API("接口"), DB("数据库");
}

/**
 * 资源embedding的种类
 */
enum class EmbeddingSource {
    DOC, API, DB, SENTENCE, TABLE
}


enum class DataSourceType {
    MySQL,Oracle
}

/**
 * embedding 任务的执行状态
 */
enum class TaskStatus {
    Pending, Succeeded, Failed
}

/**
 * 支持的文档后缀
 */
enum class FileExt {
    TXT, DOC, DOCX, PDF
}

/**
 * 表注释来源
 */
enum class CommentSrc {
    AUTO, HUMAN
}